home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx_english / underline.amicad < prev    next >
Text File  |  1999-12-06  |  758b  |  39 lines

  1. /* Soulignement d'un ou plusieurs textes */
  2. /* $VER: Souligner 1.00e (© R.Florac, 11 octobre 1998 */
  3.  
  4. options results
  5.  
  6. signal on error
  7. signal on syntax
  8.  
  9. objets=0
  10. 'SAVEALL(-1):FIRSTSEL'; i=result
  11. do while i>0
  12.     objets = objets + souligner(i)
  13.     'NEXTSEL('i')'; i=result
  14. end
  15. if objets=0 then do
  16.     'PICKOBJ("Select the text to underline")'
  17.     i=result
  18.     if i>0 then call souligner(i)
  19. end
  20. exit
  21.  
  22. souligner: procedure
  23.     parse arg i
  24.     'TYPE(O__='i')'; type=result
  25.     if type = 4 | type = 5 | type = 6 then do
  26.     'DRAW(COL(O__),LINE(O__)+1,COL(O__)+WIDTH(O__)+1,LINE(O__)+1)'
  27.     return 1
  28.     end
  29. return 0
  30.  
  31. syntax:
  32. erreur=RC
  33. 'MESSAGE("Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  34. exit
  35.  
  36. error:
  37. 'MESSAGE("Error in line 'SIGL'")'
  38. exit
  39.